package com.example;


import com.example.bean.Product;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class App
{
    public static void main( String[] args )
    {
        Product p = new Product();
        p.setId(1001);
        p.setPname("张三");
        p.setPrice(100);
        System.out.println(p);

        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        Product p1 = (Product) context.getBean("p1");
        System.out.println(p1);


    }
}
